package com.neuedu.wemall.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.neuedu.wemall.dao.entity.UserRole;
import com.neuedu.wemall.service.IUserRoleService;
import com.neuedu.wemall.dao.mapper.UserRoleMapper;

import java.util.List;

@Service("userRoleService")
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements IUserRoleService {

    @Override
    public List<UserRole> selectUserRoleList(Integer userId) {
        LambdaQueryWrapper<UserRole> qw = new LambdaQueryWrapper<>();
        qw.eq(UserRole::getUserId, userId);
        return baseMapper.selectList(qw);
    }
}